/*
 * @Description: 
 * @version: 1.0
 * @Author: ziwei
 * @Date: 2021-08-29 14:20:03
 * @LastEditors: ziwei
 * @LastEditTime: 2021-08-29 14:42:07
 */

const {
    argv
} = require("process");
const Compiler = require("./Compiler");

function webpack() {
    //1:初始化参数：从配置文件和Shell语句中读取并合并参数，最终得到配置对象
    let arg = process.argv.slice(2);
    argv.reduce((memo, option) => {
        let [key, value] = option.split("=");
    })

    //2 用上一步得到的参数初始化Compiler对象
    let compiler = new Compiler(finalOptions)

    //3.加载所有配置的插件
    let {
        plugins
    } = finalOptions
    for(){

    }
}